.class Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;
.super Landroidx/recyclerview/widget/RecyclerView$Adapter;
.source "SnippetBgView.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "b"
.end annotation


# instance fields
.field final synthetic a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;


# direct methods
.method constructor <init>(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;-><init>()V

    return-void
.end method


# virtual methods
.method public getItemCount()I
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-static {v0}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;->c(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;)Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$a;

    move-result-object v0

    const/4 v1, 0x2

    if-nez v0, :cond_0

    return v1

    .line 2
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-static {v0}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;->c(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;)Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$a;

    move-result-object v0

    invoke-interface {v0}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$a;->getCount()I

    move-result v0

    add-int/2addr v0, v1

    return v0
.end method

.method public getItemViewType(I)I
    .locals 2

    const/4 v0, 0x1

    if-eqz p1, :cond_1

    .line 1
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->getItemCount()I

    move-result v1

    sub-int/2addr v1, v0

    if-ne p1, v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 p1, 0x2

    return p1

    :cond_1
    :goto_0
    return v0
.end method

.method public onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
    .locals 2

    .line 1
    invoke-virtual {p0, p2}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->getItemViewType(I)I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    .line 2
    check-cast p1, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$ContentViewHolder;

    .line 3
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-static {v0}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;->c(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;)Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$a;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-static {v0}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;->c(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;)Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$a;

    move-result-object v0

    invoke-interface {v0, p1, p2}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$a;->a(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$ContentViewHolder;I)V

    :cond_0
    return-void
.end method

.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
    .locals 3

    const/4 v0, 0x2

    const/4 v1, 0x1

    if-ne p2, v1, :cond_0

    .line 1
    new-instance p2, Landroid/view/View;

    invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-direct {p2, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    .line 2
    iget-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-static {p1}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;->a(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;)I

    move-result p1

    invoke-virtual {p2, p1}, Landroid/view/View;->setBackgroundColor(I)V

    .line 3
    iget-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-virtual {p1}, Landroid/view/ViewGroup;->getMeasuredWidth()I

    move-result p1

    .line 4
    iget-object v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-virtual {v1}, Landroid/view/ViewGroup;->getMeasuredHeight()I

    move-result v1

    .line 5
    new-instance v2, Landroid/view/ViewGroup$LayoutParams;

    div-int/2addr p1, v0

    invoke-direct {v2, p1, v1}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    .line 6
    invoke-virtual {p2, v2}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 7
    new-instance p1, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$EmptyViewHolder;

    invoke-direct {p1, p2}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$EmptyViewHolder;-><init>(Landroid/view/View;)V

    goto :goto_0

    :cond_0
    if-ne p2, v0, :cond_2

    .line 8
    new-instance p2, Landroid/widget/ImageView;

    invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-direct {p2, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 9
    sget p1, Les/w4;->durec_local_video_placeholder:I

    invoke-virtual {p2, p1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 10
    sget-object p1, Landroid/widget/ImageView$ScaleType;->CENTER_CROP:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {p2, p1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 11
    iget-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-virtual {p1}, Landroid/view/ViewGroup;->getMeasuredHeight()I

    move-result p1

    mul-int/lit8 v0, p1, 0x10

    .line 12
    div-int/lit8 v0, v0, 0x9

    .line 13
    iget-object v1, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-static {v1}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;->b(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;)I

    move-result v1

    if-eqz v1, :cond_1

    .line 14
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$b;->a:Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;

    invoke-static {v0}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;->b(Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView;)I

    move-result v0

    .line 15
    :cond_1
    new-instance v1, Landroid/view/ViewGroup$LayoutParams;

    invoke-direct {v1, v0, p1}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    .line 16
    invoke-virtual {p2, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 17
    new-instance p1, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$ContentViewHolder;

    invoke-direct {p1, p2}, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$ContentViewHolder;-><init>(Landroid/view/View;)V

    .line 18
    iput-object p2, p1, Lcom/esfile/screen/recorder/videos/edit/ui/SnippetBgView$ContentViewHolder;->b:Landroid/widget/ImageView;

    goto :goto_0

    :cond_2
    const/4 p1, 0x0

    :goto_0
    return-object p1
.end method
